﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Runtime.InteropServices;
using Microsoft.SqlServer.Server;

public partial class UserDefinedFunctions
{
    [Microsoft.SqlServer.Server.SqlFunction]
    public static SqlString RowId()
    {
        // 在此处放置代码
        //IdWorker worker = new IdWorker(1, 1);
        //long id = worker.NextId();
        //return new SqlString(id.ToString());


        return new SqlString(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
    }

};

